package com.easy.system.util;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-6-18
 * Time: 下午1:30
 * To change this template use File | Settings | File Templates.
 */
public class Pagination {
    private boolean asc;
    private int pageSize;
    private int page;
    private int firstTotal ;

    public int getFirstTotal() {
        return firstTotal;
    }

    public void setFirstTotal(int firstTotal) {
        this.firstTotal = firstTotal;
    }

    public Pagination() {
    }
    public Pagination(int page, int pageSize) {
        this.asc = true;
        this.page = page;
        this.pageSize = pageSize;
        this.firstTotal=(this.page-1)*pageSize;
    }
    public Pagination(boolean asc, int pageSize, int page) {
        this.asc = asc;
        this.pageSize = pageSize;
        this.page = page;
        this.firstTotal=(this.page-1)*pageSize;
    }

    public boolean isAsc() {
        return asc;
    }

    public void setAsc(boolean asc) {
        this.asc = asc;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }
}
